﻿<ResourceDictionary xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation"
    xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml"
    xmlns:Controls="clr-namespace:Sinacor.Infra.UI.Controls.SmartClient;assembly=Sinacor.Infra.UI.Controls">

    <!--BEGIN MESSAGEBOX-->
    <Style x:Key="ControlMessageBoxWindow" TargetType="{x:Type Controls:SinacorMessageBoxWindow}">
        <Setter Property="WindowStyle" Value="None"/>
        <Setter Property="WindowState" Value="Normal"/>
        <Setter Property="AllowsTransparency" Value="True"/>
        <Setter Property="SizeToContent" Value="WidthAndHeight"/>
        <Setter Property="Width" Value="280"/>
        <Setter Property="MaxWidth" Value="500"/>
        <Setter Property="Height" Value="200"/>
        <Setter Property="MaxHeight" Value="600"/>
        <Setter Property="Template">
            <Setter.Value>
                <ControlTemplate TargetType="{x:Type Controls:SinacorMessageBoxWindow}">
                    <Grid HorizontalAlignment="Stretch" VerticalAlignment="Stretch" x:Name="GridDragMove" Background="Transparent">
                        <Rectangle Stroke="{DynamicResource BrushMessageBoxBorder}" RadiusX="12.716" RadiusY="12.716" x:Name="box_baixo" Fill="{DynamicResource BrushMessageBoxBackground}"/>
                        <Rectangle Stroke="{x:Null}" RadiusX="12.716" RadiusY="12.716" Margin="7.5,7.572,7.5,7.572" x:Name="box_degradee" Fill="{DynamicResource BrushMessageBoxBackgroundDegrade}"/>
                        <Path Stretch="Fill" Stroke="{x:Null}" Margin="0.5,0.5,0.5,0" VerticalAlignment="Top" Height="91.726" Data="M12.715996,0 L404.284,0 C411.30685,-3.8146973E-06 417,5.6931419 417,12.716 L417,49.661015 C380.39072,74.519222 300.79376,91.725994 208.5,91.725994 C116.20622,91.725994 36.609283,74.519222 0,49.661015 L0,12.716 C0,5.6931419 5.6931477,-3.8146973E-06 12.715996,0 z" x:Name="elipse_degradee" Fill="{DynamicResource BrushMessageBoxBackgroundEffect}"/>
                        <Grid HorizontalAlignment="Stretch" VerticalAlignment="Stretch" Margin="31.781,20,32.542,20" Width="{Binding Path=HorizontalContentAlignment, RelativeSource={RelativeSource AncestorType=Window}}">
                            <Grid.RowDefinitions>
                                <RowDefinition Height="50"/>
                                <RowDefinition Height="4.8"/>
                                <RowDefinition Height="*"/>
                                <RowDefinition Height="30"/>
                            </Grid.RowDefinitions>
                            <StackPanel Grid.Row="0" Orientation="Horizontal" Width="Auto" HorizontalAlignment="Left">
                                <Image x:Name="Icon" Height="50" Width="36" VerticalAlignment="Center" HorizontalAlignment="Left" Visibility="Visible" Margin="0,0,8,0"/>
								<TextBlock Text="{TemplateBinding Title}" FontSize="14" TextWrapping="Wrap" Foreground="{DynamicResource BrushMessageBoxTitleForeground}" HorizontalAlignment="Stretch" VerticalAlignment="Center" Style="{DynamicResource ControlFont}"/>
                            </StackPanel>
                            <Rectangle Grid.Row="1" Stroke="{x:Null}" x:Name="linha_degradee" VerticalAlignment="Center" Height="1.173" Fill="{DynamicResource BrushMessageBoxLineBackground}"/>
                            <Controls:SinacorScrollViewer Grid.Row="2" VerticalScrollBarVisibility="Auto" Height="Auto" Width="Auto" HorizontalAlignment="Stretch" Margin="0,10,0,10" VerticalAlignment="Top" >
                                <Controls:SinacorTextBox IsReadOnly="True" Background="Transparent" BorderThickness="0" x:Name="MessageText"  TextWrapping="Wrap" Text="{TemplateBinding Message}" Foreground="{DynamicResource BrushMessageBoxTitleForeground}" Style="{DynamicResource ControlFont}"/>
                            </Controls:SinacorScrollViewer>
                            
                            <StackPanel Grid.Row="3" Orientation="Horizontal" HorizontalAlignment="Center" VerticalAlignment="Stretch">
                                <Controls:SinacorButton Visibility="Collapsed" Command="Controls:SinacorMessageBoxCommands.OK"  Width="70" x:Name="ButtonOk" Content="{DynamicResource Infra.Controls.Label.OK}" IsDefault="True" IsCancel="False" TabIndex="0"/>
                                <Controls:SinacorButton Visibility="Collapsed" Command="Controls:SinacorMessageBoxCommands.Yes" Width="70" x:Name="ButtonYes" Content="{DynamicResource Infra.Controls.Label.Sim}" TabIndex="1" Margin="5,0,0,0"/>                
                                <Controls:SinacorButton Visibility="Collapsed" Command="Controls:SinacorMessageBoxCommands.No" Width="70" x:Name="ButtonNo" Content="{DynamicResource Infra.Controls.Label.Nao}" TabIndex="2" Margin="5,0,0,0"/>
                                <Controls:SinacorButton Visibility="Collapsed" Command="Controls:SinacorMessageBoxCommands.Cancel" Width="70" x:Name="ButtonCancel" Content="{DynamicResource Infra.Controls.Label.Cancelar}" IsCancel="True" TabIndex="3" Margin="5,0,0,0"/>
                            </StackPanel>
                        </Grid>
                        <Controls:SinacorButton HorizontalAlignment="Right" Margin="-112,14.322,13.946,-98.928" Style="{DynamicResource ControlButtonMessageBoxClose}" VerticalAlignment="Top" Width="14.596" Height="14.631" Content="Button" Command="Controls:SinacorWindowCommands.Close"/>
                    </Grid>
                    <ControlTemplate.Triggers>
                        <Trigger Property="MessageBoxIcon" Value="None">
                            <Setter Property="Visibility" Value="Collapsed" TargetName="Icon"/>
                        </Trigger>
                        <Trigger Property="MessageBoxIcon" Value="Error">
                            <Setter Property="Source" Value="{DynamicResource IconMessageBoxError}" TargetName="Icon"/>
                        </Trigger>
                        <Trigger Property="MessageBoxIcon" Value="Question">
                            <Setter Property="Source" Value="{DynamicResource IconMessageBoxQuestion}" TargetName="Icon"/>
                        </Trigger>
                        <Trigger Property="MessageBoxIcon" Value="Exclamation">
                            <Setter Property="Source" Value="{DynamicResource IconMessageBoxExclamation}" TargetName="Icon"/>
                        </Trigger>
                        <Trigger Property="MessageBoxIcon" Value="Information">
                            <Setter Property="Source" Value="{DynamicResource IconMessageBoxInformation}" TargetName="Icon"/>
                        </Trigger>
                        <Trigger Property="Button" Value="Ok">
                            <Setter Property="Visibility" Value="Visible" TargetName="ButtonOk"/>
                        </Trigger>
                        <Trigger Property="Button" Value="OkCancel">
                            <Setter Property="Visibility" Value="Visible" TargetName="ButtonOk"/>
                            <Setter Property="Visibility" Value="Visible" TargetName="ButtonCancel"/>
                        </Trigger>
                        <Trigger Property="Button" Value="YesNo">
                            <Setter Property="Visibility" Value="Visible" TargetName="ButtonYes"/>
                            <Setter Property="Visibility" Value="Visible" TargetName="ButtonNo"/>
                        </Trigger>
                        <Trigger Property="Button" Value="YesNoCancel">
                            <Setter Property="Visibility" Value="Visible" TargetName="ButtonYes"/>
                            <Setter Property="Visibility" Value="Visible" TargetName="ButtonNo"/>
                            <Setter Property="Visibility" Value="Visible" TargetName="ButtonCancel"/>
                        </Trigger>
                    </ControlTemplate.Triggers>
                </ControlTemplate>
            </Setter.Value>
        </Setter>
    </Style>
    <!--END MESSAGEBOX-->
</ResourceDictionary>
